package com.hanlin.beforejavacodesummary.pojo.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hanlin.beforejavacodesummary.common.BaseEntity;
import com.hanlin.beforejavacodesummary.pojo.contant.BaseConstants;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * Created by IntelliJ IDEA.
 *
 * @author: lijing
 * @since: 2025-08-15
 * @description:
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false) //callSuper = false 不将继承的父类字段算到重写的 EqualsAndHashCode
@TableName("xcus_account")
public class AccountDO extends BaseEntity {
    @TableId
    private Long id;
    private String accountNumber;

    private String accountName;
    // "所属板块"
    private String belongBlock;
    //"用户名"
    private String userName;
    //"注册手机"
    private String registerMobile;
    //"营业执照注册号"
    private String businessLicense;
    //"法人代表"
    private String legalRepresentatives;
    //"法人证件号"
    private String corporateCardNo;
    //"法人归属地"
    private String corporatePlace;
    //"经营期限"
    private String dueDate;

    //"注册时间"  JsonFormat  spring-boot-starter-web 包下的
    @JsonFormat(pattern = BaseConstants.Pattern.DATE)
    @DateTimeFormat(pattern = BaseConstants.Pattern.DATE)
//    @TableField(typeHandler = org.apache.ibatis.type.LocalDateTypeHandler.class)
    private LocalDate registerDate;
    //"收货地址"
    private String deliveryPlace;
    //"注册地址"
    private String registerAddress;
    //"登记机关"
    private String registerOrg;
    //"联系人"
    private String contactName;
    //"联系电话"
    private String contactTel;
    //"技术联系人"
    private String technicalContract;
    //"技术联系人电话"
    private String technicalPhone;
    //"营业执照照片"
    private String businessPhoto;
    // "省"
    private String provinceCode;

    private String provinceCodeMeaning;
    //"市"
    private String cityCode;
    private String cityCodeMeaning;
    //"区"
    private String areaCode;
    private String areaCodeMeaning;
    //"详细地址"
    private String detailAddress;
    //"主体单位"
    private String headquarters;
    //"开户行"
    private String accountBank;
    //"银行账号"
    private String bankAccountNum;
    //"公司简介"
    private String companyProfile;
    //"备注"
    private String remark;


    public AccountDO() {
    }

    public AccountDO(Long id, String accountName) {
        this.id = id;
        this.accountName = accountName;
    }

    @Override
    public String toString() {
        return "AccountDO{" +
                "id=" + id +
                ", accountNumber='" + accountNumber + '\'' +
                ", accountName='" + accountName + '\'' +
                ", belongBlock='" + belongBlock + '\'' +
                ", userName='" + userName + '\'' +
                ", registerMobile='" + registerMobile + '\'' +
                ", businessLicense='" + businessLicense + '\'' +
                ", legalRepresentatives='" + legalRepresentatives + '\'' +
                ", corporateCardNo='" + corporateCardNo + '\'' +
                ", corporatePlace='" + corporatePlace + '\'' +
                ", dueDate='" + dueDate + '\'' +
                ", registerDate=" + registerDate +
                ", deliveryPlace='" + deliveryPlace + '\'' +
                ", registerAddress='" + registerAddress + '\'' +
                ", registerOrg='" + registerOrg + '\'' +
                ", contactName='" + contactName + '\'' +
                ", contactTel='" + contactTel + '\'' +
                ", technicalContract='" + technicalContract + '\'' +
                ", technicalPhone='" + technicalPhone + '\'' +
                ", businessPhoto='" + businessPhoto + '\'' +
                ", provinceCode='" + provinceCode + '\'' +
                ", provinceCodeMeaning='" + provinceCodeMeaning + '\'' +
                ", cityCode='" + cityCode + '\'' +
                ", cityCodeMeaning='" + cityCodeMeaning + '\'' +
                ", areaCode='" + areaCode + '\'' +
                ", areaCodeMeaning='" + areaCodeMeaning + '\'' +
                ", detailAddress='" + detailAddress + '\'' +
                ", headquarters='" + headquarters + '\'' +
                ", accountBank='" + accountBank + '\'' +
                ", bankAccountNum='" + bankAccountNum + '\'' +
                ", companyProfile='" + companyProfile + '\'' +
                ", remark='" + remark + '\'' +
                ", createTime='" + getCreateTime() + '\'' +
                ", updateTime='" + getUpdateTime() + '\'' +
                ", isDeleted='" + getIsDeleted() + '\'' +
                '}';
    }
}
